package com.gcspring.h2db.repo;

import com.gcspring.h2db.entity.DeviceIdMapper;
import com.gcspring.h2db.entity.Websites;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface DeviceIdMapperRepository extends JpaRepository<DeviceIdMapper, Long>, JpaSpecificationExecutor<Websites> {
    @Query("select c from #{#entityName} c where c.type = :type and c.sbIdSrc = :srcId")
    List<DeviceIdMapper> findBySrcId(String type, String srcId);
}